package top.glkj.hms.service;

import org.springframework.security.core.AuthenticationException;
import org.springframework.stereotype.Service;
import top.glkj.hms.utils.VerificationCode;


/**
 * @author : xgl
 * @version : 0.0.1
 * @date :2020/8/24 18:38
 */
@Service
public interface CodeService {
    /**
     * 获取验证码
     *
     * @param id 请求编号
     * @return 验证码图片
     */
    public VerificationCode getCode(Long id);

    /**
     * 检查验证码
     *
     * @param id   验证码编号
     * @param code 验证码
     * @return 检查结果
     * @throws AuthenticationException e
     */
    public void checkCode(Long id, String code) throws AuthenticationException;
}
